﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WOS.Plugins.Remote
{
    public partial class Trace : UserControl
    {
        public Trace()
        {
            InitializeComponent();
            rm = new RemoteManager();
            rm.CommandReceived += new CommandReceiveHandler(rm_CommandReceived);
        }
        RemoteManager rm;

        private void cbTrace_CheckedChanged(object sender, EventArgs e)
        {

            rm.Start();
        }

        void rm_CommandReceived(object sender, CommandEventArgs e)
        {
            this.lbCommands.Items.Add(e.Command.Name);
        }

        private void RemoteTrace_Load(object sender, EventArgs e)
        {

        }

        private void btnSend_Click(object sender, EventArgs e)
        {
            Command c = new Command();
            c.Name = this.textBox1.Text;
            rm.CommandSend(c);
        }

        private void Trace_Load(object sender, EventArgs e)
        {

        }
    }
}
